<a href="/admin/index" <?php if($cf==0):?>style="color:#f00;"<?php endif;?>>全部</a>&nbsp;&nbsp;
<?php foreach ($class as $key => $value):?>
    <a href="/admin/index?cc=<?=$value['Class']['id']?>" <?php if($cf==$value['Class']['id']):?>style="color:#f00;"<?php endif;?>><?=$value['Class']['name']?></a>&nbsp;&nbsp;
<?php endforeach;?>
<div class="add"><a class="zAdd" href="/admin/demo_add">添加Demo</a></div>
<div class="sub">
    <div class="sub_id_6">序号</div>
    <div class="sub_title_6">标题</div>
    <div class="sub_class_6">分类</div>
    <div class="sub_promote_6">对应demo</div>
    <div class="sub_creattime_6">创建时间</div>
    <div class="sub_edit_6">操作</div>
</div>
<div class="content">
<?php foreach($demo as $key =>$value):?>
<div class="content_list">
    <div class="sub_id_6"><?=$key+1?></div>
    <div class="sub_title_6"><a href="http://www.bhu.ac.cn/ww/<?php if($value['Demo']['id']<10):?>0<?=$value['Demo']['id']?><?php else:?><?=$value['Demo']['id']?><?php endif;?>" target="_blank"><?=$value['Demo']['name']?></div>
    <div class="sub_class_6"><?=$value['Demo']['cname']?></div>
    <div class="sub_promote_6"><?php if($value['Demo']['id']<10):?>0<?=$value['Demo']['id']?><?php else:?><?=$value['Demo']['id']?><?php endif;?></div>
    <div class="sub_creattime_6"><?= date('Y-m-d',$value['Demo']['c_time']) ?></div>
    <div class="sub_edit_6"><a class="zChange" href="/admin/demo_add?id=<?=$value['Demo']['id']?>">修改</a>&nbsp;&nbsp;<form method='post' action='/admin/index?id=<?=$value['Demo']['id']?>&action=del' class="dataForm"><button type="submit" class="zDelect">删除</button></form></div>
</div>
<?php endforeach;?>
</div>
<?php $pagination_params = $this->Paginator->params(); 
if($pagination_params['pageCount'] > 1):?>
    <?php echo $this->element('pagination');?>
<?php endif; ?>